<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Entity.*"%>
<%@page import="Dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>学生作业管理</h1>
	<%
		String teacher_id = "";
		if (session.getAttribute("loginedsession") != null) {
			teacher_id = (String) session.getAttribute("loginedsession");
		}
		List<Homework> homework_list = new ArrayList<Homework>();
		if (session.getAttribute("sessionHomework") != null) {
			homework_list = (List) session.getAttribute("sessionHomework");
			session.removeAttribute("sessionHomework");
		}
	%>
	<link href="<%=request.getContextPath()%>/css/backstage.css"
		rel="stylesheet" type="text/css" />
	<div class="body">
			<table class="dataintable">
				<tr>
					<td>作业ID</td>
					<td>学生ID</td>
					<td>教师ID</td>
					<td>任务ID</td>
					<td>时间</td>
					<td>分数</td>
					<td colspan="2">操作</td>
				</tr>
				<%
					for (Homework hwk : homework_list) {
				%>
				<form action="../../TeacherControl/alterHomeworkScore" method="post" 
			name="Homework_form">
				<tr>
					<td><input type="text" value=<%=hwk.getHomework_id()%> name="homework_id" readonly ></td>
					<td><input type="text" value=<%=hwk.getStudent_id()%> name="student_id" readonly></td>
					<td><input type="text" value=<%=hwk.getTeacher_id()%> name="teacher_id" readonly></td>
					<td><input type="text" value=<%=hwk.getTask_id()%> name="task_id" readonly></td>
					<td><input type="text" value=<%=hwk.getTime()%> name="time" readonly>
					<input type="hidden" value=<%=hwk.getFile_path() %> name="file_path"></td>
					<td><input type="text" value=<%=hwk.getScore()%> name="score"></td>
					<td>
					<a href="../../TeacherControl/homeworkdownload/<%=hwk.getHomework_id()%>"
					style="text-decoration: none">点击此处下载</a>
					</td>
					<td>
					<input type="submit" value="修改">
					</td>
					
				</tr>
				</form>
				<%
					}
				%>
			</table>
		
	</div>

</body>
</html>